
<%@ page import="register.Owner" %>
<!doctype html>
<html>
	<head>
		<meta name="layout" content="main">
		<g:set var="entityName" value="${message(code: 'owner.label', default: 'Owner')}" />
		<title><g:message code="default.show.label" args="[entityName]" /></title>
	</head>
	<body>
		<a href="#show-owner" class="skip" tabindex="-1"><g:message code="default.link.skip.label" default="Skip to content&hellip;"/></a>
		<div class="nav" role="navigation">
			<ul>
				<li><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></li>
				<li><g:link class="list" action="list"><g:message code="default.list.label" args="[entityName]" /></g:link></li>
				<li><g:link class="create" action="create"><g:message code="default.new.label" args="[entityName]" /></g:link></li>
			</ul>
		</div>
		<div id="show-owner" class="content scaffold-show" role="main">
			<h1><g:message code="default.show.label" args="[entityName]" /></h1>
			<g:if test="${flash.message}">
			<div class="message" role="status">${flash.message}</div>
			</g:if>
			<ol class="property-list owner">
			
				<g:if test="${ownerInstance?.firstName}">
				<li class="fieldcontain">
					<span id="firstName-label" class="property-label"><g:message code="owner.firstName.label" default="First Name" /></span>
					
						<span class="property-value" aria-labelledby="firstName-label"><g:fieldValue bean="${ownerInstance}" field="firstName"/></span>
					
				</li>
				</g:if>

				<g:if test="${ownerInstance?.name}">
				<li class="fieldcontain">
					<span id="name-label" class="property-label"><g:message code="owner.name.label" default="Name" /></span>
					
						<span class="property-value" aria-labelledby="name-label"><g:fieldValue bean="${ownerInstance}" field="name"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${ownerInstance?.epost}">
				<li class="fieldcontain">
					<span id="epost-label" class="property-label"><g:message code="owner.epost.label" default="Epost" /></span>
					
						<span class="property-value" aria-labelledby="epost-label"><g:fieldValue bean="${ownerInstance}" field="epost"/></span>
					
				</li>
				</g:if>


				<g:if test="${ownerInstance?.phone}">
				<li class="fieldcontain">
					<span id="phone-label" class="property-label"><g:message code="owner.phone.label" default="Phone" /></span>
					
						<span class="property-value" aria-labelledby="phone-label"><g:fieldValue bean="${ownerInstance}" field="phone"/></span>
					
				</li>
				</g:if>

			
			
<%--				<g:if test="${ownerInstance?.pets}">--%>
<%--				<li class="fieldcontain">--%>
<%--					<span id="pets-label" class="property-label"><g:message code="owner.pets.label" default="Pets" /></span>--%>
<%--					--%>
<%--						<g:each in="${ownerInstance.pets}" var="p">--%>
<%--						<span class="property-value" aria-labelledby="pets-label"><g:link controller="pet" action="show" id="${p.id}">${p?.encodeAsHTML()}</g:link></span>--%>
<%--						</g:each>--%>
<%--					--%>
<%--				</li>--%>
<%--				</g:if>--%>
			
			
			</ol>
            <div class="list">
                <table>
                    <thead>
                        <tr>
<%--                            <th>Pet</th>--%>
                   	        <g:sortableColumn property="name" title="Name" />
                   	        <g:sortableColumn property="race" title="Race" />
                   	        <g:sortableColumn property="colour" title="Colour" />
<%--                   	        <g:sortableColumn property="dateCreated" title="Date Created" />--%>
<%--                   	        <g:sortableColumn property="lastUpdated" title="Last Updated" />                        --%>
                        </tr>
                    </thead>
                    <tbody>
                    <g:each in="${petList}" status="i" var="pet">
                        <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
<%--                            <td class='gallery'>--%>
<%--                            <wa:pictureLightboxAnchor picture="${pet}" size="${Image.Small}" lightboxSize="${Image.Large}" target="_blank" title="Show Original" />--%>
<%--                            </td>--%>
                            <td>
                            <g:link controller="pet" action="show" id="${pet.id}" title="Show Pet">${(pet.name ?: '...').encodeAsHTML()}</g:link></td>
                            <td>${pet.race?.encodeAsHTML()}</td>
                            <td>${pet.colour?.encodeAsHTML()}</td>
<%--                            <td><g:formatDate format="dd MMM yyyy HH:mm:ss" date="${pet.dateCreated}"/></td>--%>
<%--                            <td><g:formatDate format="dd MMM yyyy HH:mm:ss" date="${pet.lastUpdated}"/></td>--%>
                        </tr>
                    </g:each>
                    </tbody>
                </table>
            </div>            
			<g:form>
				<fieldset class="buttons">
					<g:hiddenField name="id" value="${ownerInstance?.id}" />
					<g:link class="edit" action="edit" id="${ownerInstance?.id}"><g:message code="default.button.edit.label" default="Edit" /></g:link>
					<g:actionSubmit class="delete" action="delete" value="${message(code: 'default.button.delete.label', default: 'Delete')}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" />
				</fieldset>
			</g:form>
		</div>
	</body>
</html>
